# -*- coding: UTF-8 -*-

import xeres

# Provide some helpers for font accessing.

defaultFace = 'Tahoma'
defaultHeight = 14
defaultWeight = 500

# fast font creation
def font( name=defaultFace, height=defaultHeight, weight=defaultWeight, italic=False, antialias=True ):
	return xeres.CreateFont( name, height, weight, italic, antialias )

# re-create font
def reset_font( org_font, name=None, height=None, weight=None, italic=None, antialias=None ):
	if name == None:
		name = org_font.face
	if height == None:
		height = org_font.logic_height
	if weight == None:
		weight = org_font.weight
	if italic == None:
		italic = org_font.italic
	if antialias == None:
		antialias = org_font.antialias
	return font( name, height, weight, italic, antialias )
